package com.brillilab.service.core.space;

import com.brillilab.domain.po.space.Device;
import com.brillilab.domain.vo.inventory.PanelInventoryCount;
import com.brillilab.domain.vo.lock.ItemLock;
import com.brillilab.domain.vo.space.PositionInfo;

import java.util.List;
import java.util.Map;

public interface IDeviceService {
    Device add(Device device);

    /**
     * @return boolean
     * @Description: insert takePosition device
     * @Params: [list]
     * @author wuzhiyu
     * @date 2018/11/15 9:59
     */
    boolean insertNotUserDeivce(List<Device> list);

    /**
     * @return java.lang.Integer
     * @Description: get room's device count
     * @Params: [roomId]
     * @author wuzhiyu
     * @date 2018/11/15 9:59
     */
    Integer deviceCount(Long roomId);

    /**
     * @return java.lang.Long
     * @Description: get device group id
     * @Params: []
     * @author wuzhiyu
     * @date 2018/11/15 9:58
     */
    Long getNewGroupId();

    /**
     * @return com.brillilab.domain.po.reagent.Device
     * @Description: get device
     * @Params: [deviceId]
     * @author wuzhiyu
     * @date 2018/11/15 9:58
     */
    Device get(Long deviceId);

    /**
     * @return boolean
     * @Description: delete device by id
     * @Params: [deviceId]
     * @author wuzhiyu
     * @date 2018/11/15 9:58
     */
    boolean delete(Long deviceId);

    /**
     * @return boolean
     * @Description: delete device by roomId
     * @Params: [roomId]
     * @author wuzhiyu
     * @date 2018/11/15 9:58
     */
    boolean deleteByRoomId(Long roomId);

    /**
     * @return boolean
     * @Description: updateInfo device data
     * @Params: [device]
     * @author wuzhiyu
     * @date 2018/11/15 9:58
     */
    boolean update(Device device);

    /**
     * @return boolean
     * @Description: updateInfo device/deviceGroup position
     * @Params: [list]
     * @author wuzhiyu
     * @date 2018/11/15 9:57
     */
    boolean updatePosition(List<PositionInfo> list);


    /**
     * @return java.util.List<com.brillilab.domain.vo.inventory.PanelInventoryCount>
     * @Description: TODO
     * @Params: [deviceId]
     * @author wuzhiyu
     * @date 2018/11/20 16:29
     */
    List<PanelInventoryCount> getPanelInventoryCount(Long deviceId);

    /**
     * @return java.util.List<com.brillilab.domain.po.reagent.Device>
     * @Description: TODO
     * @Params: [roomId]
     * @author wuzhiyu
     * @date 2018/11/21 11:50
     */
    List<Device> list(Long roomId);

    /**
     * @return
     * @Description: TODO
     * @Params:
     * @author wuzhiyu
     * @date 2018/11/22 9:43
     */

    List<Device> getLabAllDeviceList(Long labId,Long roomId);
    /**
     * @Description: TODO
     * @Params:
     * @return
     * @author wuzhiyu
     * @date 2019/1/10 15:33
     */
    boolean updateRoomName(Long roomId, String name);
    
    /**
     * 根据一体机编号获取设备
     * @param deviceNo
     * @return
     */
	List<Device> listByAioDeviceNo(String aioDeviceNo);

    List<ItemLock> selectDeviceLockMapByInvId(List<Long> invIds);

    List<ItemLock> selectDeviceLockMapByUsageId(List<Long> usageIds);

    List<Device> listDeviceGroupId(Long groupId);

    List<Device> getAioDevice(Long roomId);

    List<Long> getAioBindRoomIdList(Long aioLabDeivceId);
}
